<template>
  <div class="view-box">
    <div v-html="view"></div>
  </div>
</template>
<script>
import { htmlView } from './htmlView'
export default {
  name: 'htmlView',
  data() {
    return {
      view: ''
    }
  },
  mounted() {
    const view = htmlView.filter(item => item.id == this.$route.query.id)
    // console.log(this.view[0].html)
    this.view = view[0].html
  }
}
</script>
<style lang="scss" scoped>
.view-box{
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  padding: 15px;
  border: 1px solid #ebeef5;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
  background: #fff;
}
</style>